Conversation
Convert language-chooser-svelte-daisyui from a Vite app into a proper Svelte library using @sveltejs/package. This ships preprocessed .svelte files in dist/ so consumers compile them in their own build pipeline, fixing packaging and style issues when used in SvelteKit projects. Add language-chooser-svelte-demo, a new SvelteKit app that consumes the library and serves as the demo. SSR is enabled; Vite is configured with ssr.noExternal for workspace packages and CJS transitive dependencies. Also add .svelte-kit/ and .playwright-cli/ to .gitignore. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add "publishConfig": {"access": "public"} for consistency with other
publishable scoped packages in the repo, ensuring npm publish works
without needing --access public passed manually.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Override packageRoot to {projectRoot} so the package publishes from the
project root instead of dist/, matching the ./dist/... entry point paths.
Add files field to limit published contents to dist/ only.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🚩 getOwnPropertyDescriptor trap returns raw SvelteField wrapper, not unwrapped value
In asUnwrapped at components/state-management/state-management-svelte/src/transform-view-model.ts:66-74, the getOwnPropertyDescriptor trap returns { value: (svelteFields as any)[prop] }, which is the raw SvelteField wrapper object for Field-backed properties. The get trap at line 38-39 returns the unwrapped .value. This inconsistency means Object.getOwnPropertyDescriptor(proxy, 'age')?.value would return the SvelteField wrapper, while proxy.age returns the inner value. The spread operator ({...proxy}) still works correctly because it uses the get trap, not the descriptor's value. This is pre-existing behavior not changed by this PR, but worth noting as a potential source of confusion.
(Refers to lines 66-74)
Was this helpful? React with 👍 or 👎 to provide feedback.
Fixes packaging errors causing the Svelte language chooser to break in production.
This change is